import classNames from 'classnames';
import type { ReactNode } from 'react';
import './style.less';

export interface CustomButtonProps {
  onClick?: () => void;
  children?: ReactNode;
  classNames?: string;
}

function CustomButton(props: CustomButtonProps) {
  const onClick = () => {
    if (props.onClick) {
      props.onClick();
    }
  };
  return (
    <div onClick={onClick} className={classNames('custom-button', props.classNames)}>
      {props.children}
    </div>
  );
}

export default CustomButton;
